Skip to content

Preserve IFC length and plane angle units - #55

Merged
mahach666 merged 1 commit into
mainfrom
fix/ifc-unit-roundtrip
Nov 23, 2026
Merged

mahach666 merged 1 commit into
mainfrom
fix/ifc-unit-roundtrip

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #19.

  • Write feet and inches as length conversion units, and write sweep angles in the declared plane angle unit while keeping radians in the API. Read declared unit factors and keep positive small angles representable.
  • Add an explicit read/migration option for old IfcIO exports that mislabeled radian sweeps as degrees. Do not guess from the numeric angle.
  • Normalize length quantities to the model length unit and give metre-based cost quantities their explicit unit. The info command labels storey elevations with the model unit. Area and volume quantity handling is unchanged.

Release suite: 246 passed, 2 skipped, 0 failed. DocFX: 0 warnings, 0 errors. IfcOpenShell independently checked the unit factors and sweep angles; CLI migration was exercised on a synthetic mislabeled file and the repaired angle was checked independently.

@mahach666
mahach666 merged commit ad1f858 into main Nov 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Units are not read on import; Foot/Inch and AngleUnit are ignored on write

1 participant